cmake_minimum_required(VERSION 3.5)
project(communication_pkg)

SET(CMAKE_BUILD_TYPE "Release")
set(CMAKE_CXX_FLAGS "-fPIC --std=c++11 -pthread ")

# lib

# src
file(GLOB DSRC_DIR ${PROJECT_SOURCE_DIR}/src/udp_client.cpp
    ${PROJECT_SOURCE_DIR}/src/tcp_server.cpp
)
# include 
include_directories(include)
 
# test
add_executable(comm_client_test ${PROJECT_SOURCE_DIR}/test/udp_client_test.cpp ${DSRC_DIR})
target_link_libraries(comm_client_test pthread)

add_executable(udp_server_test ${PROJECT_SOURCE_DIR}/test/udp_server_test.cpp ${DSRC_DIR})
target_link_libraries(udp_server_test pthread)

add_executable(tcp_client_test ${PROJECT_SOURCE_DIR}/test/tcp_client_test.cpp ${DSRC_DIR})
target_link_libraries(tcp_client_test pthread)

add_executable(tcp_server_test ${PROJECT_SOURCE_DIR}/test/tcp_server_test.cpp ${DSRC_DIR})
target_link_libraries(tcp_server_test pthread)

   